<template>
	<view class="record">
		<van-tabs :ifbuy="true" :active="active" color="#3e527e"  @change="onTabChange">
			<van-tab title="个人信息">
				<tab1 :activeTAB="active" ref="tab1"></tab1>
			</van-tab>
			<van-tab title="修改登录密码">
				<tab2 :activeTAB="active" ref="tab2"></tab2>
			</van-tab>
			<van-tab title="修改交易密码">
				<tab3 :activeTAB="active" ref="tab3"></tab3>
			</van-tab>
		</van-tabs>
	</view>
</template>

<script>
	import tab1 from './tab/tab1.vue';
	import tab2 from './tab/tab2.vue';
	import tab3 from './tab/tab3.vue';
	export default {
		components: {
			tab1,
			tab2,
			tab3
		},
		data() {
			return {
				active: 0
			}
		},
		onShow() {
		},
		methods: {
			onTabChange (e) {
				this.active = e.detail.index
				this.$refs['tab'+(e.detail.index+1)].onClear()
			},
		}
	}
	
</script>

<style scoped lang="scss">
</style>
